!!! XML
!!! Strict
%html{"xmlns" => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", "lang" => "en"}
  %head
    /
      :plain
        # ************************************************************************
        # Time Tracker
        # Copyright (c) 2006 Lunar Logic Polska sp. z o.o.
        # 
        # Permission is hereby granted, free of charge, to any person obtaining a 
        # copy of this software and associated documentation files (the 
        # "Software"), to deal in the Software without restriction, including 
        # without limitation the rights to use, copy, modify, merge, publish, 
        # distribute, sublicense, and/or sell copies of the Software, and to 
        # permit persons to whom the Software is furnished to do so, subject to 
        # the following conditions:
        # 
        # The above copyright notice and this permission notice shall be included 
        # in all copies or substantial portions of the Software.
        # 
        # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
        # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
        # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
        # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
        # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
        # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
        # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        # ************************************************************************
    %title RubyTime
    %meta{"http-equiv" => "Content-Type", :content => "text/html; charset=UTF-8"}
    %meta{:name => "author", :content => "Lunar Logic Polska"}
    = stylesheet_link_tag 'rubytime'
    = javascript_include_tag :defaults
    = calendar_date_select_includes
    - if @current_user && @current_user.rss_feed
      = auto_discovery_link_tag(:rss, rss_feed_url(@current_user.rss_feed), :title => "Your RSS feed")
  %body
    #banner= image_tag "rubytimelogo.png", :alt => "RubyTime logo"
    #top-menu= render :partial => 'layouts/submenu'
    #sub-menu
      - unless @current_user.nil?
        %p
          Welcome
          %br
          = link_to(@current_user.name.titleize,:controller => "your_data", :action => "edit_profile")
        %div.menu-icon
          = link_to([image_tag("activities-big.png", :size => "32x32", :alt => "Your Data"), " Your activities"] ,:controller => "your_data", :action => "activities_list")
        %div.menu-icon
          = link_to([image_tag("calendar.png", :size => "32x32", :alt => "Calendar"), " Calendar"], :controller => "your_data", :action => "activities_calendar")
        %div.menu-icon
          = link_to([image_tag("new-activity.png", :size => "32x32", :alt => "New activity" ), " Enter activity"] ,:controller => "your_data", :action => "new_activity")
        %div.menu-icon
          = link_to([image_tag("profile.png", :size => "32x32", :alt => "Profile" ), " Your profile"] ,:controller => "your_data", :action => "edit_profile")
        - if @current_user.is_admin?
          %div.menu-icon
            = link_to([image_tag("feed-icon-24x24.png", :size => "24x24", :alt => "RSS Feed", :style => "padding: 4px; padding-right: 9px; width: 24px; height: 24px;"), " Your RSS feed"], :controller => "your_data", :action => "edit_rss_feed")
        %br
        %hr
        %br
        - if @current_user.is_admin?
          %div.menu-icon
            = link_to [image_tag("export.png", :size => "32x32", :alt => "Export" ), " Export data"], :controller => "admin",:action => "export_db"
          %div.menu-icon
            = link_to [image_tag("go-previous.png", :size => "32x32", :alt => "Previous day" ), " Previous day"], :controller => "admin",:action => "previous_day" 
        %div.menu-icon
          = link_to([image_tag("logout.png", :size => "32x32", :alt => "Logout" ), " Logout"] ,:controller => "login", :action => "logout")
        %br
        %hr
        %br
      %p= link_to "Credits", :controller => 'login', :action => 'credits'
      %p= RUBYTIME_VERSION
    #content
      - if flash[:notice]
        %p.flashNotice= flash[:notice]
      - if flash[:warning]
        %p.flashWarning= flash[:warning]
      - if flash[:error]
        %p.flashError= flash[:error]
      = yield 
